<?php

define("BASEDIR",__DIR__);

include BASEDIR.'/Imooc/Loader.php';

spl_autoload_register('\\Imooc\\Loader::autoload');


class Page
{
    function index()
    {
        $user = \Imooc\Factory::getUser(1);
        $user->name = 'test1';

        $this->test();
    }

    function test()
    {
        $user = \Imooc\Factory::getUser(1);
        $user->mobile = '18900001111';

    }
}

//$canvas1 = new \Imooc\Canvas();
//$canvas1->init();
//$canvas1->addDecorator(new \Imooc\ColorDrawDecorator('blue'));
//$canvas1->addDecorator(new \Imooc\SizeDrawDecorator('32'));
//$canvas1->rect(3,6,4,12);
//$canvas1->draw();


//$proxy = new \Imooc\Proxy();
//$proxy->getUserName($id);
//$proxy->setUserName($id,$name);

$p = new \Imooc\test\Ipay();
$p->foo1();